﻿using FastEndpoints;
using TodoList.Data;
using TodoList.Shared;

namespace TodoList.FastEndpoints.Features.Update;

internal sealed class Mapper : Mapper<Request, Response, TodoItem>
{
    public override TodoItem UpdateEntity(Request r, TodoItem e)
    {
        e.Title = r.Title;
        e.Description = r.Description;
        e.IsCompleted = r.IsCompleted;
        e.DueDate = r.DueDate;
        return e;
    }
}
